From eb6f52a0cbb1939d6294c1da9d5d37365e7779d3 Mon Sep 17 00:00:00 2001 From: justbur Date: Mon, 6 Jul 2015 13:40:49 -0400 Subject: [PATCH] Make arrow separator into variable --- which-key.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/which-key.el b/which-key.el index 7571f7242c3..5ae013d467f 100644 --- a/which-key.el +++ b/which-key.el @@ -28,6 +28,8 @@ (defvar which-key-max-description-length 27 "Truncate the description of keys to this length. Also adds \"..\".") +(defvar which-key-separator "→" + "Separator to use between key and description.") (defvar which-key-key-replacement-alist '(("<\\(\\(C-\\|M-\\)*.+\\)>" . "\\1") ("\\(left\\)" ."←") ("\\(right\\)" . "→")) @@ -406,14 +408,13 @@ longest key and description in the buffer, respectively." (desc (if (or prefix group) (concat "+" desc) desc)) (desc-face (if (or prefix group) 'font-lock-keyword-face 'font-lock-function-name-face)) - ;; (sign (if (or prefix group) "▶" "→")) - (sign "→") + (separator which-key-separator) (desc (which-key/truncate-description desc)) ;; pad keys to max-len-key (padded-key (s-pad-left max-len-key " " key)) (padded-desc (s-pad-right max-len-desc " " desc))) (format (concat (propertize "%s" 'face 'font-lock-constant-face) " " - (propertize sign 'face 'font-lock-comment-face) " " + (propertize separator 'face 'font-lock-comment-face) " " (propertize "%s" 'face desc-face) " ") padded-key padded-desc))) unformatted)) -- 2.30.2